#include "award.h"

award::award(QGraphicsPixmapItem *parent) : QGraphicsPixmapItem(parent)
{

}
award::award(QPixmap _pixmap,QPoint _pos, int _awardType)
{
    this->setPixmap(_pixmap);
    this->setPos(_pos);
    this->AD_type = _awardType;
    AdSpeed = 6;
}

void award::awardMove(QPoint _dir)
{
    this->moveBy(_dir.x() * AdSpeed , _dir.y() * AdSpeed);
}

award::awardType award::getAwardType() const
{
    if(AD_type == 0)
    {
        return award::awardType::AD_simpleAward;
    }
    else if(AD_type == 1)
    {
        return award::awardType::AD_superAward;
    }
}

void award::setIsMeetSetback(bool state)
{
    isMeetSetback = state;
}

bool award::checkIsMeetSetback()
{
    return isMeetSetback;
}
